package top.zsyle.sycc.dto;


import lombok.Data;
import top.zsyle.sycc.utils.AssertUtil;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
public class RegisterPhoneDto {

    @NotBlank(message = "电话号码不能为空！")
    @Pattern(regexp = AssertUtil.CHINA_PATTERN_PHONE_STR,message = "电话格式错误！")
    private String mobile;

    @NotBlank(message = "密码不能为空！")
    @Size(min = 6,max = 15,message = "密码长度必须在6-15之间")
    private String password;

    @NotBlank(message = "短信验证码不能为空！")
    private String smsCode;

    @NotNull(message = "注册方式不能为空！")
    private Integer regChannel;
}
